package prv.behavioral.command;

/* The test class or client */
public class Demo {
	public static void main(String[] args) {
		Light lamp = new Light();
		Command switchUp = new FlipUpCommand(lamp);
		Command switchDown = new FlipDownCommand(lamp);

		Switch s = new Switch();

		s.storeAndExecute(switchUp);
		s.storeAndExecute(switchDown);
		s.storeAndExecute(switchUp);

		System.out.println(s.getHistory());
	}
}
